package com.dofast.bt.mvp.model;

import com.dofast.bt.bean.AttentionBean;
import com.dofast.bt.bean.EnjoyBean;
import com.dofast.bt.bean.GoodsBean;
import com.dofast.bt.bean.MyCar;
import com.dofast.bt.bean.ShopBean;
import com.dofast.bt.bean.ShoppingCartBean;

import org.xutils.ex.DbException;

import java.util.List;

/**
 * Created by Administrator on 2016/12/26 0026.
 */

public interface  IMainModel {
    /**
     * 获取首页类型下，标签下的商品列表
     *
     * @param flagId 标签id
     * @return
     */
    List<GoodsBean> getGoodsByFlag(int flagId) throws DbException;

    /**
     * 获取首页店铺
     *
     * @return 店铺
     */
    List<ShopBean> getShops() throws DbException;
    /**
     * 获取关注店铺列表
     * @return 列表
     * @throws DbException
     */
    List<AttentionBean> getCollectStores() throws DbException;

    /**
     * 关注商铺
     * @param shopId 商铺id
     * @return 是否操作成功
     */
    boolean attentionShop(int shopId) throws DbException;


    /**
     * 取消关注商铺
     * @param shopId 商铺id
     * @return 是否操作成功
     */
    boolean cancelAttentionShop(int shopId) throws DbException;

    /**
     * 根据店铺id获取店铺详情
     * @param shopId 店铺id
     * @return 店铺详情
     */
    ShopBean getShopById(int shopId) throws DbException;

    /**
     * 是否关注店铺
     * @param shopId 店铺id
     * @return
     * @throws DbException
     */
    boolean isAttention(int shopId)throws DbException;

    /**
     * 是否收藏商品
     * @param goodsId 商品id
     * @return
     * @throws DbException
     */
    boolean isEnjoyed(int goodsId) throws DbException;

    /**
     * 是否加入购物车
     * @param goodsId
     * @return
     * @throws DbException
     */
    boolean isAddCar(int goodsId) throws DbException;


    /**
     * 根据id获取商品详情
     * @param goodsId shangpid
     * @return 商品详情
     */
    GoodsBean getGoodsById(int goodsId) throws DbException;


    /**
     * 获取收藏宝贝列表
     * @return 列表
     * @throws DbException
     */
    List<EnjoyBean> getEnjoy()throws DbException;

    /**
     * 收藏商品
     * @param goodsId 商品id
     * @return 是否操作成功
     */
    boolean enjoyGoods(int goodsId) throws DbException;


    /**
     * 取消收藏商品
     * @param goodsId 商铺id
     * @return 是否操作成功
     */
    boolean cancelEnjoyGoods(int goodsId) throws DbException;

    /**
     * 获取购物车列表
     * @return 列表
     * @throws DbException
     */
    List<ShoppingCartBean> getShoppingCar() throws DbException;

    /**
     * 加入购物车
     * @param goodsId 商品id
     * @return 是否操作成功
     */
    boolean addCar(int goodsId) throws DbException;


    /**
     * 移除购物车
     * @param goodsId 商品id
     * @return 是否操作成功
     */
    boolean deleteCar(int goodsId) throws DbException;

    MyCar getMyCar() throws DbException;

}
